package com.hxkj.client.service;

import com.hxkj.domain.po.FriendlyLink;
import com.platform.common.domain.result.ParameterDataStruct;
import com.platform.common.domain.result.ResultDataStruct;
import com.platform.common.domain.result.ResultMessageStruct;
import com.platform.common.domain.result.ResultPageStruct;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;


/**
 * @author chenfangzhou
 * @create 2018-05-23 11:58
 * @desc 友情链接对外接口
 **/
@FeignClient(name = "cms-management")
public interface FriendlyLinkServiceClient {
    /**
     * 获取友情链接列表
     *
     * @param parameterDataStruct
     * @return
     * @throws Exception
     */
    @RequestMapping(value = "/friendlink/getlist", method = RequestMethod.POST, consumes = "application/json;charset=UTF-8")
    ResultPageStruct<FriendlyLink> getFriendlyLinkList(@RequestBody ParameterDataStruct<FriendlyLink> parameterDataStruct) throws Exception;


    /**
     * 获取单个链接
     *
     * @param friendlyLink
     * @return
     * @throws Exception
     */
    @RequestMapping(value = "/friendlink/get", method = RequestMethod.POST, consumes = "application/json;charset=UTF-8")
    ResultDataStruct<FriendlyLink> getFriendlyLink(@RequestBody FriendlyLink friendlyLink) throws Exception;


    /**
     * 新增友情链接
     *
     * @param friendlyLink
     * @throws Exception
     */
    @RequestMapping(value = "/friendlink/save", method = RequestMethod.POST, consumes = "application/json;charset=UTF-8")
    ResultMessageStruct saveFriendlyLink(@RequestBody FriendlyLink friendlyLink) throws Exception;


    /**
     * 删除友情链接
     *
     * @param friendlyLink
     * @throws Exception
     */
    @RequestMapping(value = "/friendlink/remove", method = RequestMethod.POST, consumes = "application/json;charset=UTF-8")
    ResultMessageStruct deleteFriendlyLink(@RequestBody FriendlyLink friendlyLink) throws Exception;


    /**
     * 修改链接
     *
     * @param friendlyLink
     * @throws Exception
     */
    @RequestMapping(value = "/friendlink/modify", method = RequestMethod.POST, consumes = "application/json;charset=UTF-8")
    ResultMessageStruct updateFriendlyLink(@RequestBody FriendlyLink friendlyLink) throws Exception;


    /**
     * 获取友情链接列表,不带分页
     *
     * @param friendlyLink
     * @return
     * @throws Exception
     */
    @RequestMapping(value = "/friendlink/getListNoPage", method = RequestMethod.POST, consumes = "application/json;charset=UTF-8")
    List<FriendlyLink> getFriendlyLinkListNoPage(@RequestBody FriendlyLink friendlyLink) throws Exception;

}
